package com.example.TodayNews.fragments;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.example.TodayNews.LoginActivity;
import com.example.TodayNews.R;

/**
 * Created by jackydu on 2015/6/16.
 */
public class UserFragment extends Fragment implements View.OnClickListener {
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View ret = inflater.inflate(R.layout.fragment_user, container, false);

        ImageView imageView = (ImageView) ret.findViewById(R.id.user_icon);
        imageView.setOnClickListener(this);
        return ret;
    }

    @Override
    public void onClick(View v) {
        //TODO 进行登录
        Intent intent  = new Intent(getActivity(), LoginActivity.class);
        startActivity(intent);
    }
}